// Copyright (C) joyinter
// All rights reserved.
// 
// Author : lyp
// Date   : 2006-11-14

#ifndef __POPMESSAGEWND_H_COMMON_UI__
#define __POPMESSAGEWND_H_COMMON_UI__

#pragma once
#include <common\ui\wnd.h>
#include <common\ui\button.h>
#include <common\ui\imagectrl.h>
#include <common\ui\label.h>
#include <common\netmsg\netmsg.h>
#include <common/ui/htmlview.h>
#include "resource.h"


class CPopMessageWnd : public CJoyWnd
{
	DECLARE_DYNAMIC(CPopMessageWnd)
public:
   CPopMessageWnd(void);
  ~CPopMessageWnd(void);
protected:
  
 
  CJoyButton* m_btndescry;
  CJoyButton* m_btnclose;
  CJoyImageCtrl *m_ImagCtrl;
  CJoyHtmlPanel*  m_context;

  virtual void CM_DescryClick(CJoyButton*);
  virtual void CM_CloseClick(CJoyButton*);
  virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
  virtual void CM_Draw(Graphics& graph);

public:
  char m_PopMessageWndTitle[128];
  char m_PopMessageWndContext[512];
  char m_PopMessageWndUrl[512];
  bool  m_active;
  DECLARE_MESSAGE_MAP()
   afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
   afx_msg LRESULT OnNcHitTest(CPoint point);
   afx_msg void OnDestroy();
   afx_msg void OnClose();
};


class CPopMessageDlg : public CDialog
{
	DECLARE_DYNAMIC(CPopMessageDlg)

protected:
  

public:

 	CPopMessageWnd  m_PopMessageWnd;
 	CPopMessageDlg(CWnd* pParent);   // standard constructor
    virtual ~CPopMessageDlg();
    int mibottom ;
    void SetPopwindowInfo(JoyMessage::MS_PopWindow *lpinfo);	
   

// Dialog Data
	enum { IDD = IDD_JOYSETTINGDLG };

protected:
 	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
    virtual BOOL PreTranslateMessage(MSG* pMsg);

 	DECLARE_MESSAGE_MAP()
public:
	  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	  afx_msg void OnSize(UINT nType, int cx, int cy);
	  afx_msg LRESULT OnNcHitTest(CPoint point);
	  afx_msg void OnTimer(UINT nIDEvent);
	  afx_msg void OnClose();
	  afx_msg void OnDestroy();
	   
  
};


#endif 
